import {ColumnList as TableColumnList} from "@/component/list-table/types.ts";
import type {PopoverProps} from "element-plus";

interface PopoverPageEmit<T = any> {
    callback: [row: T]
    change: [val?: string]
    showEvent: [],
    hideEvent: [],
    currentChange: [val: number]
    sizeChange: [val: number]
    'update:pageIndex': [val: number]
    'update:pageSize': [val: number]
}

interface PopoverPageBasicProps<T = any> {
    modelValue: string
    data: T,
    columnList: TableColumnList
    totalCount: number,
    prop: string
    // label: string
    pageIndex?: number,
    pageSize?: number,
    loading?: boolean
    placeholder?: string
    isAuto?: boolean
}

type PopoverPageProps<T = any> = PopoverPageBasicProps<T> & Omit<Partial<PopoverProps>, 'visible'>

export type { PopoverPageEmit, PopoverPageBasicProps, PopoverPageProps }
